﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using BUSINESS_OBJECT;
namespace CRM.admin
{
    public partial class appointment : System.Web.UI.Page
    {
        Appmntcls apcls = new Appmntcls();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable dt = apcls.GetRecords(-99, -99, "", "", -99, "",Convert.ToDateTime("1/1/1800"), false, " and ");
                GridView1.DataSource = dt;
                GridView1.DataBind();

            }
        }

        protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "delete") 
            {
                //DataTable dt=apcls.GetRecords(Convert.ToInt64(dt.Rows[0]["ID"].ToString()),;
                
                //apcls.ID=Convert.ToInt64(dt.Rows[0]["ID"].ToString());
                //apcls.CID=Convert.ToInt64(dt.Rows[0]["CID"].ToString());
                //apcls.COMPANY_PERSON_NAME=dt.Rows[0]["COMPANY_PERSON_NAME"].ToString();
                //apcls.COMPANY_ADDRESS=dt.Rows[0]["COMPANY_ADDRESS"].ToString();
                //apcls.PHONE_NO=Convert.ToInt64(dt.Rows[0]["PHONE_NO"].ToString());
                //apcls.REASON=dt.Rows[0]["REASON"].ToString();
                //apcls.DATE=dt.Rows[0]["DATE"].ToString();
                //apcls.ISDELETED=true;
                //apcls.SaveRecords();
                //Response.Redirect("~/appointment.aspx");
            }



        }

        
    }
}
